<div class="sales index">
<h2><?php __('Sales');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<ul class="content">
<?php
$i = 0;
foreach ($sales as $sale):
?>
	
	<li>
		<table class="items">
			<tr>
				<td colspan="2">Image here</td>
			</tr>
			<tr>
				<td>Item: </td>
				<td><?php echo $html->link($sale['Item']['name'], array('controller' => 'items', 'action' => 'view', $sale['Item']['id'])); ?></td>
			</tr>
			<tr>
				<td>Time end:</td>
				<td><?php echo $sale['Sale']['timeEnd']; ?></td>
			</tr>
			<tr>
				<td>Price:</td>
				<td><?php echo $sale['Sale']['currentPrice']; ?></td>
			</tr>
			<tr>
				<td>Member:</td>
				<td><?php echo $html->link($sale['User']['login'], array('controller' => 'users', 'action' => 'view', $sale['User']['id'])); ?></td>
			</tr>
			<tr>
				<td colspan="2">
					<?php echo $html->link(__('Licitate', true), array('action' => 'licitate', $sale['Sale']['id'])); ?>
				</td>
			</tr>
				<tr>
				<td colspan="2">
					<?php echo $html->link(__('View', true), array('action' => 'view', $sale['Sale']['id'])); ?>
				</td>
			</tr>
			
			
		</table>
	</li> 
	

<?php endforeach; ?>
</ul>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('New Sale', true), array('action' => 'add')); ?></li>
		<li><?php echo $html->link(__('List Items', true), array('controller' => 'items', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Item', true), array('controller' => 'items', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Users', true), array('controller' => 'users', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New User', true), array('controller' => 'users', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Follows', true), array('controller' => 'follows', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Follow', true), array('controller' => 'follows', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Licitations', true), array('controller' => 'licitations', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Licitation', true), array('controller' => 'licitations', 'action' => 'add')); ?> </li>
	</ul>
</div>